using Microsoft.SharePoint;

namespace Ratman.SharePoint.SharePointSandBoxMediaPlayer
{
    public class SharePointSandBoxMediaPlayerResourcesFeatureReceiver : SPFeatureReceiver
    {

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            using (SPSite _SPSite = properties.Feature.Parent as SPSite)
            {
                using (SPWeb _SPWeb = _SPSite.RootWeb)
                {
                    SPList _SPList = _SPWeb.Lists["SharePoint sandBox Media Player Resources"];

                    if (_SPList != null)
                    {
                        _SPList.Delete();
                        _SPWeb.Update();
                    }
                }
            }
        }

        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
        }

        public override void FeatureInstalled(SPFeatureReceiverProperties properties)
        {
        }

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
        {
        }
    }
}
